package ecstore.client;

import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;

import ecstore.client.dataOperation.ItemInfo;


/**
 * The async counterpart of <code>DataStorageService</code>.
 */
public interface DataStorageServiceAsync {
	void DataStorageService(String input, AsyncCallback<String> callback)
			throws IllegalArgumentException;
	
	void addItemService(String category, String brand, String name, float price, String size, String description,
			String thumbnail, String image, int itemStock, int itemRecmdStock, AsyncCallback<Boolean> callback)
	throws IllegalArgumentException;

	void addItemService(String category, String brand, String name, float price, String size, String description,
			String thumbnail, String image, int Window, int row, int col, int itemStock, int itemRecmdStock, AsyncCallback<Boolean> callback)
	throws IllegalArgumentException;
	
	void getTobacco(AsyncCallback<List<ItemInfo>> callback) throws IllegalArgumentException;
	
	void getItems(String filter, AsyncCallback<List<ItemInfo>> callback) throws IllegalArgumentException;
	
	/**
	 * update an item 
	 * @param stringKey the item to be updated
	 * @param itemInfo the new information stored
	 */
	void updateItem(String stringKey, ItemInfo itemInfo, AsyncCallback<Boolean> callback) throws IllegalArgumentException;
}
